<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8">
	<title></title>
</head>

<body>
	<button>输入</button>
	<script>
		document.querySelector('button').onclick = function () {
			text = prompt("输入想输出的内容")
			document.write(text)
		}

	</script>
</body>

</html>